package com.example.module_home.model.service

import com.example.lib_net.RetrofitFactory
import com.example.lib_net.entity.ResponseEntity
import com.example.module_home.model.api.VideoApi
import com.example.module_home.model.entity.SimpleVideoEntity


/**
 * @author ytx
 * @createDate 2022/4/24 10:49
 * @description
 *
 * @updateUser ytx
 * @updateDate 2022/4/24 10:49
 * @updateRemark
 *
 * @version 1.0.0
 */
class VideoService {
    val api: VideoApi
    init {
        api= RetrofitFactory.getRetrofitFactory().create(VideoApi::class.java)
    }

    /**
     * 获取推荐的Simple视频信息
     */
    suspend fun getRecommendSimpleVideo(page:Int,pagesize:Int): ResponseEntity<List<SimpleVideoEntity>> {
        return api.getRecommendSimpleVideo(page,pagesize)
    }


    /**
     * 根据ChannelId获取对应的适配信息
     */
    suspend fun getSimpleVideoByChannelId(channelId:String, page:Int, pagesize:Int):ResponseEntity<List<SimpleVideoEntity>>{
        return api.getSimpleVideoByChannelId(channelId,page,pagesize)
    }

}